home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / enigma / earcd / utility / utilfile / xpksourc.lha / xpk_Source / XFH / dossupport.h < prev    next >
C/C++ Source or Header  |  1996-10-19  |  688b  |  30 lines

  1. /* 'dossupport.h' - AmigaDOS support rutines. */
  2.  
  3. #ifndef EXEC_TYPES_H
  4. #include <exec/types.h>
  5. #endif
  6.  
  7. #ifndef DOS_DOS_H
  8. #include <dos/dos.h>
  9. #endif
  10.  
  11. /* Memory allocation. */
  12. void    *dosalloc(LONG);
  13. void    dosfree(void *);
  14.  
  15. /* dalloc(p) points pointer p to suitable sized allocated mem. */
  16. /* The value of p is returned. */
  17. #define dalloc(p) ( (p)=dosalloc( sizeof(*(p)) ) )
  18. #define dfree(p) dosfree( (p) )
  19.  
  20. /* BCPL conversion. */
  21. BSTR    cstr2b(STRPTR cstr, STRPTR buf);
  22. STRPTR    bstr2c(BSTR bstr, STRPTR buf);
  23. BSTR    cstr2binplace(STRPTR pp);
  24. STRPTR    bstr2cinplace(STRPTR pp);
  25.  
  26. #define c2b(cptr) ( (ULONG)(cptr) >> 2 )
  27. #define b2c(bptr) ( (void *)( (ULONG)(bptr) << 2) )
  28.  
  29. /* End of dossupport.h */
  30.